import React from 'react';
import PropType from 'prop-types';
import './index.scss';

class CommonBorder extends React.PureComponent {
  static propTypes = {
    content: PropType.element.isRequired,
  };
  render() {
    const { title, btn, content } = this.props;
    return (
      <div className="common-border-page">
        <div className="common-content-project">
          {
            title || btn ?
              <div className="common-top-wrap">
                {
                  title ?
                    <div className="common-title-wrap">{title || ''}</div> : ''
                }
                <div className="common-btn-wrap" >
                  {btn || ''}
                </div>
              </div>
              : ''
          }
          <div className="common-content-wrap" style={{ paddingTop: !title && !btn ? '40px' : '20px', height: !title && !btn ? '640px' : '550px' }}>
            {
              content || ''
            }
          </div>
        </div>
      </div>
    );
  }
}

export default CommonBorder;
